<?php
/**
 * Created by PhpStorm.
 * User: baiguiren
 * Date: 3/26/17
 * Time: 9:24 AM
 */

namespace App\Console;

use DB;
use Illuminate\Console\Command;

class Test extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'test';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'test';


    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        $this->runTask();
    }

    protected function runTask()
    {
        $str = <<<a
yeie522581492@163.com----asw309497
zhiba3053825@163.com----oa000752
shaoshun4230@163.com----seq801622
xi1115mutao@163.com----xyz08656162
shi1790jupo4@163.com----qm69161
weibozhaoyou238@163.com----v0320618
yanmu95947ga@163.com----cj617018
xa0525368zizh@163.com----mi047516
sijie51644yu@163.com----uzo59915
xugvpisddm01606@163.com----mm006388020988
zdrr45652@163.com----wn6027
tghqc7021@163.com----ap13757
youna3716anti571@163.com----cq03998
roufljau8442862@163.com----cvp00318
symcl3294@163.com----jne13822
xe4070567dang@163.com----pv198043
tiluef512@163.com----zhuan35155
qmvekce355638@163.com----un597461
wlkdnwih463861@163.com----zsf1004
wziux815848@163.com----ndp182724
you5723caiba@163.com----fax40277
xingua917249@163.com----ks814020
toupxpg9972155@163.com----qv273894
vzvp95232766@163.com----tib9018
thnbbgdi64225@163.com----gx326496
uuvxzzsv19261@163.com----yva04695
sxkjvt29652@163.com----nq904752
shuo2094307pia@163.com----cf4936
sgipt9462019@163.com----ibu0658
zetyhcef9973806@163.com----ykk249184
u79518867weish@163.com----mc2004
rhqzhc76894@163.com----xz24357
ttk60117@163.com----iq8946
qv14778018fanx@163.com----wr5885
xbwoqgmj19218215@163.com----xng3042
ya7004584ciyu@163.com----fa152663
xamj592039@163.com----ka8939
zefdfhm070939@163.com----tak671717
sx73595372ji@163.com----rc589066
rpvr047571@163.com----hb352338
tkxt444203@163.com----wn303983
uaeamur139378@163.com----lb73780
u1626949yongj@163.com----rbo53430
xo2439584jika@163.com----gw77523
wyloluey0682@163.com----wn528753
aywq36302@163.com----og869329
w96140503weito@163.com----oa63350
shuazhengz50529@163.com----qiu156586
rl28715553xuya@163.com----bu219052
xin06114yunbei@163.com----cx869172
xvpudk1738257@163.com----ah50700
yonghei10355@163.com----bu86997
tyqnmlj40098@163.com----kkb871500
tubzhpe03@163.com----dx7777
wrddahk024968@163.com----ah2540073
tgwlwa68@163.com----gua4710
zhang3380gong@163.com----pjp298475
shangjiuyou643@163.com----wcq24122
tlxuihvk694926@163.com----eg42539
uvs83173852@163.com----pq132555
yxreyaj4051@163.com----rvk5546
tdbmjz547742@163.com----nrqexz285547
rancgxqz9393@163.com----pm2600
zdzeum666@163.com----mba08077
rjsk1413318@163.com----bg8851
yddgybx8092@163.com----tw5926
vfs0550093huanq@163.com----kvq492844
x0408961zhifen@163.com----ea04684
wsjtb55152@163.com----tp9154
sufenzhongyi155@163.com----ku37346
shanchengmi945@163.com----vjl54166375
xv40692020zi@163.com----jt975448
shanyan428285@163.com----adr2486
ydphe36298@163.com----lpw2907
tingmp014@163.com----96677d7f5e
zhangaoche67@163.com----mam1761291
xo7868271yar@163.com----phb93174
vqfisq385@163.com----kfs956639
wf49898437yi@163.com----yhh1644
xl35014964yuanji@163.com----hh388589
a;
        $account_arr = explode(PHP_EOL, $str);

        foreach ($account_arr as $key=>&$value) {
            $temp = explode('----', $value);
            $account_arr[$key] = [
                'account' => $temp[0],
                'password' => $temp[1]
            ];
        }
        var_dump($account_arr);

        DB::table('account')->insert($account_arr);
    }
}